/**
 * 逍遥CMS - 公共样式
 * 此文件包含网站的公共样式，会在所有页面中引用
 */

/* ========== 全局样式 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

a {
  color: #409EFF;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #66b1ff;
}

/* ========== 布局容器 ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ========== 头部样式 ========== */
header {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
}

.site-title {
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

/* ========== 导航菜单 ========== */
.nav {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 20px 0;
}

.nav a {
  padding: 8px 15px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.nav a:hover {
  background-color: #f0f0f0;
}

/* ========== 主内容区 ========== */
main {
  padding: 30px 0;
}

.content-box {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

/* ========== 文章列表 ========== */
.article-list {
  list-style: none;
}

.article-item {
  padding: 20px;
  border-bottom: 1px solid #eee;
  transition: background-color 0.3s;
}

.article-item:hover {
  background-color: #fafafa;
}

.article-item:last-child {
  border-bottom: none;
}

.article-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.article-meta {
  font-size: 12px;
  color: #999;
  margin-bottom: 10px;
}

.article-meta span {
  margin-right: 15px;
}

.article-summary {
  color: #666;
  line-height: 1.8;
}

/* ========== 分页样式 ========== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 30px 0;
}

.pagination a {
  padding: 8px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
}

.pagination a:hover {
  background-color: #409EFF;
  color: #fff;
  border-color: #409EFF;
}

.pagination .active {
  background-color: #409EFF;
  color: #fff;
  border-color: #409EFF;
}

/* ========== 底部样式 ========== */
footer {
  background-color: #2c3e50;
  color: #fff;
  padding: 30px 0;
  margin-top: 50px;
}

.footer-content {
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  list-style: none;
  margin-bottom: 15px;
}

.footer-links a {
  color: #ecf0f1;
}

.footer-links a:hover {
  color: #fff;
}

.copyright {
  font-size: 12px;
  color: #95a5a6;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }

  .nav {
    flex-direction: column;
    gap: 10px;
  }

  .article-title {
    font-size: 18px;
  }

  .footer-links {
    flex-direction: column;
    gap: 10px;
  }
}
